package com.hnas.trade.util;

import java.util.Date;
import java.util.Random;

import com.hnas.core.util.DateUtil;

public class OrderNoUtil {

	public static String createOrderNo(String accountId,String bussinessType){
		StringBuffer sb = new StringBuffer("");
		sb.append(bussinessType);
		sb.append(DateUtil.dateTimeToString2(new Date()));
		Random random = new Random();
        int val = random.nextInt(9000)+1000;//为变量赋随机值1000-9999
        sb.append(val);
        sb.append(accountId.substring(accountId.length()-4, accountId.length()));
        return sb.toString();
	}
}
